#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
int main()
{
	int a;
	double ans = 0;
	for (int i=100;i<=999;i++)
	{
		double ans = 0;
		int ret = i;
		while (ret)
		{
			a = ret % 10;
			ret /= 10;
			ans += pow(a, 3);
		}
		if (ans == i)
		{
			printf("%d\n",i);
		}
	}


	return 0;
}